home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group99a.txt / 000189_icon-group-sender _Wed Sep 8 07:48:30 1999.msg < prev    next >
Internet Message Format  |  2000-09-20  |  1KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id HAA28228
  4.     for icon-group-addresses; Wed, 8 Sep 1999 07:47:56 -0700 (MST)
  5. Message-Id: <199909081447.HAA28228@baskerville.CS.Arizona.EDU>
  6. Date: Wed, 8 Sep 1999 13:13:46 +1200 (NZST)
  7. From: "Richard A. O'Keefe" <ok@hermes.otago.ac.nz>
  8. To: icon-group@optima.CS.Arizona.EDU, lhotaf@lexma.meitech.com,
  9.         memphis@macconnect.com
  10. Subject: Re: Is open(..,"b") broken in MPW Icon 9.0?
  11. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  12. Status: RO
  13.  
  14.     #if MACINTOSH
  15.           if ((status & (Fs_Read|Fs_Write)) == (Fs_Read|Fs_Write)) {
  16.              mode[1] = '+';
  17.              mode[2] = ((status & Fs_Untrans) != 0) ? 'b' : 't';
  18.              }
  19.           else mode[1] = ((status & Fs_Untrans) != 0) ? 'b' : 't';
  20.     #endif     /* MACINTOSH */
  21.     
  22. 't' is a Windows-ism that has no defined effect in the C standard,
  23. nor is it defined in any of the Macintosh C compilers I have ready
  24. access to.  The modes supported are
  25.  
  26.     (r|w|a)(+[b]|b[+])
  27.  
  28. Some Macintosh C compilers define '\n' to be CR, which is the only
  29. really sensible choice, and with those compilers the 'b' option is
  30. superfluous.  Some define '\n' to be LF, which is really really
  31. silly, and those compilers translate between external CR and internal
  32. LF.  So the 'b' option is not superfluous with those compilers.
  33.  
  34.